package com.idev.common.job;

import org.apache.commons.lang.time.FastDateFormat;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

import java.util.Date;

/**
 * Created by yigeyanse on 2017/6/16.
 */
@Component
public class GirlProcesser implements IProcesser{

    public final static long SECOND = 1 * 1000;
    FastDateFormat fdf = FastDateFormat.getInstance("yyyy-MM-dd HH:mm:ss");

    @Override
    @Scheduled(fixedRate = SECOND * 10) //固定间隔时间 @Scheduled(fixedRate = 时间间隔 )
    public void process() {
        System.out.println("[GirlProcesser]:"+ fdf.format(new Date()));
    }
}
